package org.smile.validate.ann;

import org.smile.annotation.AliasFor;
import org.smile.validate.Field;
import org.smile.validate.ValidateType;

import java.lang.annotation.*;

@Target({ElementType.METHOD,ElementType.ANNOTATION_TYPE,ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Field(type = ValidateType.maxLength)
public @interface MaxLength {
    /**字段名称*/
    @AliasFor(annotation = Field.class)
    String name() default "";
    /**字段名称*/
    @AliasFor(annotation = Field.class)
    String value();
    /**不通过时字段名称提示语*/
    @AliasFor(annotation = Field.class)
    String text() default "";
    /**不通过时字段名称提示语国际化字符名称*/
    @AliasFor(annotation = Field.class)
    String key() default "";
    /**假如为空时*/
    @AliasFor(annotation = Field.class)
    public boolean ifnull() default true;
}
